@extends('layouts.appDomain')

@section('content')

    <div class="container py-5">
        <div class="row justify-content-center">
            <div class="col-md-8">
                <div class="card panel">
                    <div class="card-header">修改密码</div>

                    <div class="card-body">
                        <form method="POST" action="{{ url('user/changePwd') }}">
                            @csrf

                            <div class="form-group row">
                                <label for="password_old" class="col-md-4 col-form-label text-md-right">原密码</label>

                                <div class="col-md-6">
                                    <input id="password_old" type="password" class="form-control @error('password_old') is-invalid @enderror" name="password_old" required>

                                    @error('password_old')
                                    <span class="invalid-feedback" role="alert">
                                        <strong>{{ $message }}</strong>
                                    </span>
                                    @enderror
                                </div>
                            </div>

                            <div class="form-group row">
                                <label for="password" class="col-md-4 col-form-label text-md-right">新密码</label>

                                <div class="col-md-6">
                                    <input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required>

                                    @error('password')
                                    <span class="invalid-feedback" role="alert">
                                        <strong>{{ $message }}</strong>
                                    </span>
                                    @enderror
                                </div>
                            </div>

                            <div class="form-group row">
                                <label for="password2" class="col-md-4 col-form-label text-md-right">确认新密码</label>

                                <div class="col-md-6">
                                    <input id="password2" type="password" class="form-control @error('password2') is-invalid @enderror" name="password2" required>

                                    @error('password2')
                                    <span class="invalid-feedback" role="alert">
                                        <strong>{{ $message }}</strong>
                                    </span>
                                    @enderror
                                </div>
                            </div>


                            <div class="form-group row mb-0">
                                <div class="col-md-8 offset-md-4">
                                    <button type="submit" class="btn btn-primary">
                                        修改
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
